package com.uinnova.product.eam.init.cassso;

import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import javax.annotation.Resource;

@Configuration
@ConditionalOnProperty(name = "monet.login.loginMethod", havingValue = "guotouiam")
public class CASWebMvcConfig implements WebMvcConfigurer {

    @Resource
    private CASUserOnlineInterceptor casUserOnlineInterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(casUserOnlineInterceptor);
    }
}
